package com.its.web;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 朱厚强
 * @version 1.0
 * @classname TestController
 * 用来测试的控制器
 */
@RestController
@RefreshScope // 配置文件热更新
@RequestMapping("/TestController")
public class TestController {
    @Value("${name:}")
    private String name;
    @Value("${server.port:}")
    private String port;
    @GetMapping("/show")
    public String show() {
        return "name值为:"+name+"port = " + port;
    }
}
